<template>
  <div style="width: 1190px;margin: 0 auto">
    <div class="title">{{ $t("vr.clues1") }}</div>
    <div class="title2">{{ $t("vr.clues") }}</div>
    <div class="title2">{{ $t("vr.clues4") }}</div>
    <!-- <div class="title">{{ $t("vr.clues2") }}</div> -->
    <!-- <div class="title">{{ $t("vr.clues3") }}</div> -->
    <div class="line"></div>
    <div style="margin-bottom: 10px;">
      <div class="meetingroom">{{ $t("vr.meetingroom") }}</div>
      <div class="linkroom">{{ $t("vr.linkroom") }}</div>
    </div>
    <div style="width: 100%;">
      <div v-for="(item, index) in expertsList" :key="index">
        <div
          v-if="index % 2 == 0"
          style="background: #F3F3F3;
                                   "
        >
          <div class="itemmeetingroom">{{ item.name }}</div>
          <div class="itemlinkroom">
            <a :href="item.url" class="linkcolor">{{ $t("vr.jumpclues") }}</a>
          </div>
        </div>
        <div v-if="index % 2 == 1">
          <div class="itemmeetingroom">{{ item.name }}</div>
          <div class="itemlinkroom">
            <a :href="item.url" class="linkcolor">{{ $t("vr.jumpclues") }}</a>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import api from "servicePath/index"
import { mapState } from "vuex"
export default {
  data () {
    return {
      expertsList: []
    }
  },
  watch: {
    i18nGo (val) {
      // 初始化获取专家数据
      if (val === "zh") {
        this.$router.push({
          name: "PC-首页"
        })
      }
      this.handleGetExpertsList()
    }
  },
  computed: {
    ...mapState(["lang"]),
    i18nGo () {
      return this.lang
    }
  },
  mounted () {
    // 初始化获取专家数据
    this.handleGetExpertsList()
  },
  methods: {
    // 获取专家列表
    async handleGetExpertsList () {
      const params = {
        language: this.lang
      }
      const res = await api.getExpertsList(params)
      this.expertsList = res.data
      console.log(res)
    }
  }
};
</script>

<style lang="scss" scoped>
.title {
  margin-top: 10px;
  width: 100%;
  font-size: 16px;
  font-weight: 500;
  color: #020202;
  line-height: 25px;
}

.title2 {
  width: 100%;
  font-size: 16px;
  font-weight: 500;
  color: #020202;
  line-height: 25px;
}
.line {
  width: 100%;
  height: 1px;
  background: #e8e8e8;
  margin-top: 10px;
}
.meetingroom {
  margin-top: 10px;
  width: 350px;
  font-size: 16px;
  font-weight: 500;
  color: #020202;
  line-height: 25px;
  display: inline-block;
}
.linkroom {
  margin-top: 10px;
  margin-left: 160px;
  width: 350px;
  font-size: 16px;
  font-weight: 500;
  color: #020202;
  line-height: 25px;
  display: inline-block;
}
.itemmeetingroom {
  margin-top: 10px;
  width: 350px;
  font-size: 16px;
  font-weight: 500;
  color: #020202;
  line-height: 25px;
  display: inline-block;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.itemlinkroom {
  margin-left: 160px;
  font-size: 16px;
  font-weight: 500;
  color: #a0a0a0;
  line-height: 25px;
  display: inline-block;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.itembg {
  margin-left: 160px;
  background: #f3f3f3;
  margin-right: 160px;
}
.linkcolor {
  color: #009fe4;
}
</style>
